home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-25 | 2.6 KB | 68 lines | [TEXT/GEOL] |
- Item 1280157 25-May-90 14:13PDT
-
- From: D0416 Futuresoft System Design,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: TDeskScrap Bug in MA 2.0
-
- Fellow MacAppers,
-
- Below is a message from John Baxter on Compuserve about a bug that he reported
- about a month ago. The bug still exist in MA 2.0 final although it is noted in
- the Release Notes. To refresh your memory, he reported that when there is
- _both_ PICT and TEXT on the public scrap, TDeskScrapView will try and do a
- DrawPicture on the text handle instead of the picture handle resulting in a
- “garbage-like” display in the Clipboard window. Cut, Copy and Paste of the
- Clipboard, however, does function properly.
-
- He has already sent this bug report to MacApp.Test and MacApp.Bugs.
-
- -Ken Addison
- FutureSoft System Designs
-
- *---- M e s s a g e f r o m J o h n B a x t e r o n C I S ---*
-
- Fm: John Baxter 71735,1626
- To: All
-
- Too late for a fix in MacApp 2.0, I reported the problem with both TEXT and
- PICT types in the Desk Scrap. This problem appears as the third known bug in
- the MacApp 2.0 Release Notes (thanks!!). As I was applying my fix for the
- problem (reversing the two calls to LookForScrapType, as shown here:)
-
- fHavePicture := LookForScrapType('PICT'); { JWB Swapped 5/24/90. }
- fHaveText := LookForScrapType('TEXT');
-
- (lines 162 and 163 of UMacApp.TDeskScrapView.p), I believe I see another
- problem (I wish I'd caught it before!). LookForScrapType calls GetScrap.
- GetScrap is a potential heap-compactor (according to "Inside Macintosh X-Ref"
- from Addison-Wesley). Hence, I believe the two assignments to fields of SELF
- in those two lines are examples of dangerous use of de-referenced pointers.
-
- This may well not result in problems often enough to have been noticed, since
- I suspect the heap is in a somewhat empty state at the time this code is
- executed.
-
- For my own purposes, I'm going to change my fix, to use a new temporary
- variable:
- hasScrapType: BOOLEAN;
-
- Then the code becomes
- { JWB 5/24/90 Reversed the sequence and used a temporary variable. }
- hasScrapType := LookForScrapType('PICT');
- fHavePicture := hasScrapType;
- hasScrapType := LookForScrapType('TEXT');
- fHaveText := hasScrapType;
-
- I hope the above is (a) correct, and (b) helpful.
- --John
-
- PS--The above has been AppleLinked (via CI$) to Apple.Bugs and MacApp.Test.
- Ken Addison, if you agree with the above, would you be so kind as to copy it to
- MacApp.TECH$ on AppleLink (I understand that large address lists cause the
- gateway from CI$ problems). Many thanks.
-
- *--- END OF CIS Message ---*
-
-